﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CardWarWEB
{

    [Serializable]
    public class iItem
    {
        public int ID;
        public int Hash;
        public string Name;
        public string Note;
        public string Description;

        public iTypes Type;
        public CardWarWEB.iTypes SType;
        public iEquips Equips;
        public iClasses Class;

        public long HP;
        public long FireArmor;
        public long IceArmor;
        public long NaturalArmor;
        public long WaterArmor;
        public long LightArmor;
        public long DarkArmor;
        public long SpaceArmor;

        public long FireUP;
        public long IceUP;
        public long NaturalUP;
        public long WaterUP;
        public long LightUP;
        public long DarkUP;
        public long SpaceUP;

        public bool canSell;
        public bool canDestroy;

        public long SellCost;

        public int Level;
        public int Count = 1;

        public static iItem Get(int i)
        {
            iItem s = null;
            #region 新手火焰胸甲 普通 0
            if (i == 0)
            {
                s = new iItem();
                s.ID = i;
                s.Hash = Guid.NewGuid().GetHashCode();
                s.Name = "新手火焰胸甲";
                s.Note = "";
                s.Description = "专门为新手发放的护甲，对火属性攻击有着一定的抗性！";
                s.Type = iTypes.装备;
                s.Equips = iEquips.胸甲;
                s.SType = CardWarWEB.iTypes.普通;
                s.Class = iClasses.通用;
                s.HP = 480;
                s.FireArmor = 265;
                s.IceArmor = 0;
                s.NaturalArmor = 0;
                s.WaterArmor = 0;
                s.LightArmor = 0;
                s.DarkArmor = 0;
                s.SpaceArmor = 0;
                s.FireUP = 0;
                s.IceUP = 0;
                s.NaturalUP = 0;
                s.WaterUP = 0;
                s.LightUP = 0;
                s.DarkUP = 0;
                s.SpaceUP = 0;
                s.canSell = true;
                s.canDestroy = true;
                s.SellCost = 1;
                s.Level = 1;
            }
            #endregion
            #region 新手冰霜鞋子 普通 1
            else if (i == 1)
            {
                s = new iItem();
                s.ID = i;
                s.Hash = Guid.NewGuid().GetHashCode();
                s.Name = "新手冰霜鞋子";
                s.Note = "";
                s.Description = "专门为新手发放的鞋子，对冰属性攻击有着一定的抗性！";
                s.Type = iTypes.装备;
                s.Equips = iEquips.鞋子;
                s.SType = CardWarWEB.iTypes.普通;
                s.Class = iClasses.通用;
                s.HP = 404;
                s.FireArmor = 0;
                s.IceArmor = 209;
                s.NaturalArmor = 0;
                s.WaterArmor = 0;
                s.LightArmor = 0;
                s.DarkArmor = 0;
                s.SpaceArmor = 0;
                s.FireUP = 0;
                s.IceUP = 0;
                s.NaturalUP = 0;
                s.WaterUP = 0;
                s.LightUP = 0;
                s.DarkUP = 0;
                s.SpaceUP = 0;
                s.canSell = true;
                s.canDestroy = true;
                s.SellCost = 1;
                s.Level = 1;
            }
            #endregion
            #region 新手风水腰带 普通 2
            else if (i == 2)
            {
                s = new iItem();
                s.ID = i;
                s.Hash = Guid.NewGuid().GetHashCode();
                s.Name = "新手风水腰带";
                s.Note = "";
                s.Description = "专门为新手发放的腰带，对风、水属性攻击有着一定的抗性！";
                s.Type = iTypes.装备;
                s.Equips = iEquips.腰带;
                s.SType = CardWarWEB.iTypes.普通;
                s.Class = iClasses.通用;
                s.HP = 478;
                s.FireArmor = 0;
                s.IceArmor = 0;
                s.NaturalArmor = 0;
                s.WaterArmor = 223;
                s.LightArmor = 0;
                s.DarkArmor = 0;
                s.SpaceArmor = 0;
                s.FireUP = 0;
                s.IceUP = 0;
                s.NaturalUP = 0;
                s.WaterUP = 0;
                s.LightUP = 0;
                s.DarkUP = 0;
                s.SpaceUP = 0;
                s.canSell = true;
                s.canDestroy = true;
                s.SellCost = 1;
                s.Level = 1;
            }
            #endregion
            #region 新手自然项链 普通 3
            else if (i == 3)
            {
                s = new iItem();
                s.ID = i;
                s.Hash = Guid.NewGuid().GetHashCode();
                s.Name = "新手自然项链";
                s.Note = "";
                s.Description = "专门为新手发放的项链，对自然属性攻击有着一定的抗性！";
                s.Type = iTypes.装备;
                s.Equips = iEquips.项链;
                s.SType = CardWarWEB.iTypes.普通;
                s.Class = iClasses.通用;
                s.HP = 391;
                s.FireArmor = 0;
                s.IceArmor = 0;
                s.NaturalArmor = 218;
                s.WaterArmor = 0;
                s.LightArmor = 0;
                s.DarkArmor = 0;
                s.SpaceArmor = 0;
                s.FireUP = 0;
                s.IceUP = 0;
                s.NaturalUP = 0;
                s.WaterUP = 0;
                s.LightUP = 0;
                s.DarkUP = 0;
                s.SpaceUP = 0;
                s.canSell = true;
                s.canDestroy = true;
                s.SellCost = 1;
                s.Level = 1;
            }
            #endregion
            #region 老爷爷戒指 史诗 4
            else if (i == 4)
            {
                s = new iItem();
                s.ID = i;
                s.Hash = Guid.NewGuid().GetHashCode();
                s.Name = "老爷爷戒指";
                s.Note = "无意间在暗影峡谷找到的戒指";
                s.Description = "蕴含着一股强大的灵魂力量，但好像激活不了";
                s.Type = iTypes.装备;
                s.Equips = iEquips.戒指1;
                s.SType = CardWarWEB.iTypes.史诗;
                s.Class = iClasses.通用;
                s.HP = 300;
                s.FireArmor = 30;
                s.IceArmor = 30;
                s.NaturalArmor = 30;
                s.WaterArmor = 30;
                s.LightArmor = 30;
                s.DarkArmor = 30;
                s.SpaceArmor = 30;
                s.FireUP = 120;
                s.IceUP = 120;
                s.NaturalUP = 120;
                s.WaterUP = 120;
                s.LightUP = 120;
                s.DarkUP = 120;
                s.SpaceUP = 120;
                s.canSell = false;
                s.canDestroy = true;
                s.SellCost = 0;
                s.Level = 450;
            }
            #endregion
            #region 荆棘手套 稀有 5
            else if (i == 5)
            {
                s = new iItem();
                s.ID = i;
                s.Hash = Guid.NewGuid().GetHashCode();
                s.Name = "荆棘手套";
                s.Note = "被动：将敌人对自身造成伤害的2.4%以自然伤害返还\r\n被动：当生命值低于25%时，返还伤害提升为7.2%";
                s.Description = "祖传手套！！！";
                s.Type = iTypes.装备;
                s.Equips = iEquips.护手;
                s.SType = CardWarWEB.iTypes.稀有;
                s.Class = iClasses.通用;
                s.HP = 565;
                s.FireArmor = 0;
                s.IceArmor = 0;
                s.NaturalArmor = 362;
                s.WaterArmor = 189;
                s.LightArmor = 0;
                s.DarkArmor = 0;
                s.SpaceArmor = 0;
                s.FireUP = 0;
                s.IceUP = 0;
                s.NaturalUP = 177;
                s.WaterUP = 0;
                s.LightUP = 0;
                s.DarkUP = 0;
                s.SpaceUP = 0;
                s.canSell = true;
                s.canDestroy = true;
                s.SellCost = 3000;
                s.Level = 60;
            }
            #endregion
            #region 祈愿之力 不朽 6
            else if (i == 6)
            {
                s = new iItem();
                s.ID = i;
                s.Hash = Guid.NewGuid().GetHashCode();
                s.Name = "祈愿之力";
                s.Note = "进行一次祈愿";
                s.Description = "进行一次祈愿，获得3件物品或者技能\r\n至少有一件为稀有或稀有以上品质\r\n甚至可能出现服务器最高品质【不朽】的物品或技能";
                s.Type = iTypes.物品;
                s.Equips = iEquips.普通;
                s.SType = CardWarWEB.iTypes.不朽;
                s.Class = iClasses.通用;
                s.HP = 0;
                s.FireArmor = 0;
                s.IceArmor = 0;
                s.NaturalArmor = 0;
                s.WaterArmor = 0;
                s.LightArmor = 0;
                s.DarkArmor = 0;
                s.SpaceArmor = 0;
                s.FireUP = 0;
                s.IceUP = 0;
                s.NaturalUP = 0;
                s.WaterUP = 0;
                s.LightUP = 0;
                s.DarkUP = 0;
                s.SpaceUP = 0;
                s.canSell = false;
                s.canDestroy = true;
                s.SellCost = 0;
                s.Level = 5000;
            }
            #endregion
            #region 小型生命药水 稀有 7
            else if (i == 7)
            {
                s = new iItem();
                s.ID = i;
                s.Hash = Guid.NewGuid().GetHashCode();
                s.Name = "小型生命药水";
                s.Note = "提升下几次战斗的最大生命值";
                s.Description = "在下两次战斗中，最大生命值提升2500点";
                s.Type = iTypes.消耗品;
                s.Equips = iEquips.普通;
                s.SType = CardWarWEB.iTypes.稀有;
                s.Class = iClasses.通用;
                s.HP = 2500;
                s.FireArmor = 0;
                s.IceArmor = 0;
                s.NaturalArmor = 0;
                s.WaterArmor = 0;
                s.LightArmor = 0;
                s.DarkArmor = 0;
                s.SpaceArmor = 0;
                s.FireUP = 0;
                s.IceUP = 0;
                s.NaturalUP = 0;
                s.WaterUP = 0;
                s.LightUP = 0;
                s.DarkUP = 0;
                s.SpaceUP = 0;
                s.canSell = true;
                s.canDestroy = true;
                s.SellCost = 1000;
                s.Level = 40;
            }
            #endregion
            return s;
        }


        [Serializable]
        public enum iTypes
        {
            装备,
            物品,
            消耗品

        }

        [Serializable]
        public enum iEquips
        {
            普通,
            头部,
            胸甲,
            鞋子,
            护手,
            肩膀,
            腿部,
            腰带,
            披风,
            项链,
            戒指1,
            戒指2,
            饰品1,
            饰品2,
            衬衣,
            战袍
        }
    }
}
